<template>
  <div class="main"> 
      <Form :model="dataModule" :label-width="120" style="" inline>
          <FormItem label="合同编号：" style="width:30%">{{dataModule.contractCode}}</FormItem> 
          <FormItem label="所属机构：" style="width:30%">{{dataModule.organizationName}}</FormItem> 
          <FormItem label="机构编码：" style="width:30%">{{dataModule.organizationCode}}</FormItem> 
          <FormItem label="商户编码：" style="width:30%">{{dataModule.merchantCode}}</FormItem> 
          <FormItem label="商户名称：" style="width:30%">{{dataModule.merchantName}}</FormItem> 
          <FormItem label="商品数量：" style="width:30%">{{dataModule.productQty}}</FormItem> 
          <FormItem label="业务场景：" style="width:30%">{{dataModule.orderSourceCn}}</FormItem> 
          <FormItem label="支付渠道：" style="width:30%">{{dataModule.payChannelCn}}</FormItem> 
          <FormItem label="预付额度：" style="width:30%">{{ moneyCount ? `${moneyCount}元` : '0' }}</FormItem> 
          <FormItem label="发票类型：" style="width:30%">{{dataModule.invoiceTypeCn}}</FormItem> 
          <FormItem label="税率：" style="width:30%">{{dataModule.taxRate}}%</FormItem> 
          <FormItem label="签订日期：" style="width:30%">{{dataModule.contract_sign_date}}</FormItem> 
          <FormItem label="开始日期：" style="width:30%">{{dataModule.contractStartDate}}</FormItem> 
          <FormItem label="终止日期：" style="width:30%">{{dataModule.contractEndDate}}</FormItem> 
          <FormItem label="汇联易商户号：" style="width:30%">{{dataModule.huilianyi_no}}</FormItem>   
      </Form>
      <Button type="primary" @click="goBack">返回</Button>
  </div>
</template>
<script>
import { Modal,Form, FormItem, Button} from "view-design";
import { namespace } from "../Module/configContractModule.js";
import util from "@/utils/util";

export default {
  components: { 
    Modal, 
    Form,
    FormItem,
    Button
  },
  beforeMount: async function() {
    let id = this.$route.query.id;
    let response = await this.$store.dispatch(`${namespace}/getDetail`, id).then(res => {
      if (res.ret === 0) {
        this.dataModule = res.data;
        this.moneyCount = util.toMoney(this.dataModule.amount)
      }
    })
  },
  data () {
    return {
      seeModal:false,
      id:'',
      dataModule: {
          name:'nihihi',
          createTimeBegin:'',
          createTimeEnd:'',
          refundTimeBegin:'',
          refundTimeEnd:''
      },
      moneyCount: ''
    }
  },
  created() {
  },
  methods:{
    goBack () {
      this.$router.push('configContract');
    }
  }
}
</script>
<style lang="less" scoped>
.main {
  /deep/ .ivu-date-picker .ivu-picker-panel-body {
      display: block !important;
  }
}
</style>


